﻿<Window x:Class="CRM.Tools.JavaScriptConverter.ConvertWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="CRM 4 To CRM 2011 JavaScript Converter" ResizeMode="CanResizeWithGrip" WindowStartupLocation="CenterScreen" WindowStyle="SingleBorderWindow" mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" Height="500" Width="1000">

    <Grid Margin="0" HorizontalAlignment="Stretch">
        <Grid.RowDefinitions>
            <RowDefinition Height="22"  />
            <RowDefinition Height="50"  />
            <RowDefinition Height="30"  />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Menu Name="uxMenu" Height="22"  Grid.Row="0" Grid.ColumnSpan="2" VerticalAlignment="Top" BorderThickness="0" >
            <Menu.Background>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FFC9D2E1" Offset="0" />
                    <GradientStop Color="#FFB3BED1" Offset="1" />
                </LinearGradientBrush>
            </Menu.Background>
            <MenuItem Name="uxFileMenu" Header="_File" VerticalContentAlignment="Center">
                <MenuItem Name="uxFileMenuExit" Header="E_xit" InputGestureText="Alt+F4" Click="uxFileMenuExit_Click" />
            </MenuItem>
            <MenuItem Name="uxAboutMenu" Header="_About" Click="uxAboutMenu_Click" VerticalContentAlignment="Center" />
        </Menu>
        <Button Grid.Row="1" Grid.Column="0"  Margin="6,6,6,6" Name="uxConvert" Height="30" Width="100" HorizontalAlignment="Left" ToolTip="Click to convert CRM4 JavaScript to CRM5 JavaScript" DataContext="{Binding}" Content="Convert" Click="uxConvert_Click" />
        <Label Grid.Row="2" Grid.Column="0"  Margin="6,0,6,0" Content="CRM 4 Script" VerticalAlignment="Bottom" FontWeight="Bold" />
        <Label Grid.Row="2" Grid.Column="2"  Margin="6,0,6,0" Content="CRM 2011 Script" VerticalAlignment="Bottom"  FontWeight="Bold"  />
        <TextBox Grid.Row="3" Grid.Column="0" Margin="6,0,6,6" Name="uxCRM4" VerticalScrollBarVisibility="Auto" TextWrapping="Wrap" AcceptsReturn="True" AcceptsTab="True" Text="" BorderThickness="2">
            <TextBox.ContextMenu>
                <ContextMenu Name="uxCRM4Context" StaysOpen="true">
                    <MenuItem Header="Copy" Click="uxCRM4_Copy_Click" />
                    <MenuItem Header="Select All" Click="uxCRM4_SelectAllText_Click" />
                    <MenuItem Header="Paste" Click="uxCRM4_Paste_Click"/>
                    <MenuItem Header="Clear" Click="uxCRM4_Clear_Click"/>
                    <MenuItem Header="Undo" Click="uxCRM4_Undo_Click" />
                </ContextMenu>
            </TextBox.ContextMenu>
        </TextBox>
        <TextBox Grid.Row="3" Grid.Column="1"  Margin="6,0,6,6" Name="uxCRM5" VerticalScrollBarVisibility="Auto" TextWrapping="Wrap" AcceptsReturn="True" AcceptsTab="True" Text="" BorderThickness="2">
            <TextBox.ContextMenu>
                <ContextMenu Name="uxCRM5Context" StaysOpen="true">
                    <MenuItem Header="Copy" Click="uxCRM5_Copy_Click" />
                    <MenuItem Header="Select All" Click="uxCRM5_SelectAllText_Click" />
                    <MenuItem Header="Paste" Click="uxCRM5_Paste_Click"/>
                    <MenuItem Header="Clear" Click="uxCRM5_Clear_Click"/>
                    <MenuItem Header="Undo" Click="uxCRM5_Undo_Click" />
                </ContextMenu>
            </TextBox.ContextMenu>
        </TextBox>

    </Grid>
    <Window.Background>
        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FF9CAAC1" Offset="0.39" />
            <GradientStop Color="#FF293955" Offset="1" />
        </LinearGradientBrush>
    </Window.Background>
</Window>
